<template>
<div class="topNav">
      <!-- 列表 -->
      <div class="topLeft">
          <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-liebiao"></use>
          </svg>
      </div>
      <!-- 标题 -->
      <div class="topCenter">
          <span class="navBtn" @click="$router.push('/me')">我的</span>
          <span class="navBtn active">发现</span>
          <span class="navBtn">云村</span>
          <span class="navBtn">视频</span>
      </div>
      <!-- 搜索 -->
      <div class="topRight">
        <svg class="icon search" aria-hidden="true" @click="sear">
              <use xlink:href="#icon-search"></use>
          </svg>
      </div>
    </div>
</template>

<script>
    export default {
        naem: "topNav",
        methods: {
            sear: function() {
                this.$router.push('/searchview')
            }
        }
    }
</script>

<style lang="less" scoped>
.topNav {
    width: 7.5rem;
    height: 1rem;
    display: flex;
    align-items: center;
    // space-between平均分布 向两边靠
    justify-content: space-between;
    padding: 0 0.2rem;
    .icon {
        width: 0.5rem;
        height: 0.5rem;
    }
    .search {
        width: 0.45rem;
        height: 0.45rem;
    }
    .topCenter {
        width: 4.5rem;
        display: flex;
        // space-around平均分布
        justify-content: space-around;
        .active{
            font-weight: 900;
        }      
    }
}
</style>